#include <cstdio>
#include <ctime>
#include <cstdlib>

using namespace std;

const int n=8;

void makeData() {
    FILE *f=fopen("zh.in", "w");
    fprintf(f, "%d\n", n);
    for (int i=2; i<=n; i++) {
        fprintf(f, "%d %d\n", i, rand()%(i-1)+1);
    }
    fclose(f);
}

int main() {
    srand(time(0));
    for (int i=1; ; i++) {
        printf("Test#%d:", i);
        makeData();
        bool flag=false;
        if (flag = system("./checker")) printf("CE\n");
        else if (flag = system("./bin")) printf("RE\n");
        else if (flag = system("diff zh.out checker.out")) printf("WA\n");
        else printf("AC\n");
        if (flag) return -1;
    }
    return 0;
}
